package com.xw.exception;

import com.xw.enums.ResultEnum;
import lombok.Getter;

/**
 * @Description:
 * @Author: y
 * @CreateDate: 9/14/21 10:16 AM
 * @Version: 1.0
 */
@Getter
public class YdException extends RuntimeException {
    private Integer code;

    public YdException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public YdException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }
}